<!DOCTYPE HTML>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index, all" />
    <title>Ol-Cesium | Vectors example</title>
    <link rel="stylesheet" href="../node_modules/ol/ol.css" type="text/css"></link>
    <style>.cesium-credit-textContainer { display: inline-block; font-size: 50%; line-height: 100%;}</style>
  </head>
  <body>
    <div style="text-align: right;">
      <button id="sandbox-button"><i class="fab fa-codepen fa-lg"></i> Edit in sandbox</button>
      <form method="POST" id="sandbox-form" target="_blank" action="https://codesandbox.io/api/v1/sandboxes/define">
        <input id="sandbox-params" type="hidden" name="parameters">
      </form>
    </div>

    <div id="example-html-source">
      <div class="clear-map-sandbox" id="map2d" style="width:600px;height:400px;float:left;"></div>
      <div class="clear-map-sandbox" id="mapCesium" style="width:600px;height:400px;float:left;position:relative;"></div>
      <div><input id="enable" type="button" value="Enable/disable Cesium" /></div>
      <div><input type="button" value="Toggle depth test"
        onclick="javascript:scene.globe.depthTestAgainstTerrain = !scene.globe.depthTestAgainstTerrain; ol3d.getAutoRenderLoop().restartRenderLoop()" /></div>
      <div><input type="button" value="Toggle circle style"
        onclick="javascript:toggleStyle()" /></div>
      <div><input type="button" value="Add/remove one vector layer"
        onclick="javascript:addOrRemoveOneVectorLayer()" /></div>
      <div><input type="button" value="Add/remove one feature"
        onclick="javascript:addOrRemoveOneFeature()" /></div>
      <div><input type="button" value="Toggle clampToGround mode"
        onclick="javascript:toggleClampToGround(); ol3d.getAutoRenderLoop().restartRenderLoop()" /></div>
      <div>
        <input id="framerate" type="number" min="0" step="10" value="10"/>
        <input type="button" value="Set the target rendering frame rate"
          onclick="javascript:setTargetFrameRate()" />
      </div>
      <div>Vectors are synchronized from the OpenLayers map to the Cesium scene.
        <br/>3D positioning and some styling is supported.<br />The render loop is automatically stopped when idle.</div>
    </div>

    <script src="./inject_ol_cesium.js"></script>
    <script type="module" src="./vectors.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/lz-string@1.4.4/libs/lz-string.min.js"></script>
  </body>
</html>
